<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class BookChapters extends Model
{
    protected $table = 'book_chapters';
    protected $casts = [
        'updated_at' => 'datetime:Y-m-d H:i:s',
        'created_at' => 'datetime:Y-m-d H:i:s',
    ];

    public function book()
    {
        return $this->hasOne(Books::class, 'id', 'book_id');
    }
}
